Davar4: MDK - Preparation of writing modules Homepage Help index Previous

 
 

Preparation of writing modules


Writings are modules similar to lexicones, but with more flexible format. User selects records from combo box. Keys can be following types: word text as key (Latin, Hebrew, Greek) or Strong# as key word , gematrical value as key word or reference key word. Writing data format is used also for user notes by setting D4_UserNotes to value 1 in info.txt

Writing can have up to 10 headings, where can be used various tags (e.g. Hebrew or Greek texts, Strong#, references, PDF references etc..)

Below headings, there is description text area, where tags can be used.

Writing modules are SQLite3 database files. You can also open .dwr (or .not for notes) file in database browser to edit.

Also, it is possible to use writing module as all "library" with many different texts. For example module "Extra Biblical texts" which collects many different texts.

 

It is recommended to use first heading area (if headings are used) with writing key (e.g. with Word label)

 

There are two programs for preparation of writing modules. Both needs two input files: data.txt and info.txt. File info.txt contains definition of writing structure (number and type of the headers etc.) and this define structure must be followed in data.txt. Most items in info.txt was explained in preparation of book section, please look there too.

 

Following programs are for conversion to writing module:

d4dwr.exe is program for creation of all writing modules. See Example4 - STRIPD_HE as DWR

d4dwrtxt.exe is program, which simplify creation of writing "library" with many texts. In case when you have big plain text and want to quickly prepare writing "library" module, you can use it. See Example5 - Imitation of Christ as DWR text.

 

 

 


Example5 - Imitation of Christ as DWR text (use of d4dwrtxt.exe convertor)

This is an example, which you will find in MDK folder. After compilation of module, you can move prepared dwr file to data folder, start Davar4 and open this module.

 

Writing module (Imitation of Christ): Selected part of text from data.txt are inserted into combo box as labels. This parts of text can be long and correspond to "chapters" or "books" or "letters" or any other division. User can select from combo part of text to display.

 

info.txt file

 

Example of info.txt file used in Example5 - Imitation of Christ as DWR text (blue, bold) , next line (red) is commentary and explanation (not a part of file!). All red commentaries also starts here by ; character - thus you can copy and paste to editor all section below and use it as template for your module.

;THIS FILE MUST BE UTF-8, Little Endian, without Byte Order Mark. New line is CR+LF pair

D4_Version_Major=1
D4_Version_Minor=0

D4_OutputFile=imch_en.dwr
D4_Abbreviation=Imitation_EN
D4_Title=Imitation of Christ
D4_Info=The Imitation of Christ (Latin: De Imitatione Christi) by Thomas à Kempis is a Catholic devotional book. It was first composed in Latin ca.1418-1427. It is a handbook for spiritual life arising from the Devotio Moderna movement, of which Kempis was a member. The Imitation is perhaps the most widely read devotional work next to the Bible, and is regarded as a devotional and religious classic. Its popularity was immediate, and it was printed 745 times before 1650. Apart from the Bible, no book has been translated into more languages than the Imitation of Christ. The text is divided into four books, which provide detailed spiritual instructions: "Helpful Counsels of the Spiritual Life", "Directives for the Interior Life", "On Interior Consolation" and "On the Blessed Sacrament". The approach taken in the Imitation is characterized by its emphasis on the interior life and withdrawal from the world, as opposed to an active imitation of Christ by other friars. The book places a high level of emphasis on the devotion to the Eucharist as key element of spiritual life. Source: Wikipedia
D4_Copyright=Public Domain
D4_URL=http://www.davar3.net/

;above are inserted same data as in lexicones and books, look to links to study

D4_UserNotes=0

;use 0 for writings, notes are created with value=1 (=able to edit in note editor)


D4_BooksNumber=0
D4_BooksExternNumber=0

;in this case, key is NOT reference and we do NOT use any references in text. Thus, we do not need info about books.

 

;Type of key or headers:0=Latin,1=HE,2=GR texts,
;10=Strong HE+GR, 11=HE Strong, 12=GR Strong,
;20=Gematria HE+GR, 21=gematria HE, 22=gematria GR
;30=references
D4_KeyType=0

;key for this module is latin based text (=0)

 

;specification of main language and sublanguage. We use standard Windows
;values expressed by hexadecimal number. This affects sorting of keys in
;module. For English use 0x09 and 0x00, for Hebrew: 0x0d and 0x00 and
;for Greek 0x08 and 0x00. List of all possible values can be found in
;README.TXT for d4lex program and also in MSDN for MAKELANGID macro (also available freely online on Microsoft web)
D4_KeyPrimaryLanguage=0x09
D4_KeySubLanguage=0x00
;values for English language, as main text

 

D4_Headers=0

;NOTE: we do NOT have any headers (which are common for all records). Each record is unique text.

;here can be used 0-9 headers. Not used can be omitted
;D4_HeaderType0=1
;D4_HeaderLabel0=Word:
;1.st param: HEADER IS VISIBLE (1=yes, 0=no),
;2.nd param: INSERT NEW LINE AFTER HEADER (1=yes, 0=no)
;3.rd param: USE THIS HEADER FOR SEARCHING (e.g. Strong# of word) (1=yes, 0=no)
;D4_HeaderParam0=1,1,1

;first character on line is ; thus lines above are ignored

 

D4_Tags=0

;Tag flags: 0=tag not used,1=tag is used and default visible,3=tag is used and default invisible |
D4_Tag_Preface=0
D4_Tag_Christ=0
D4_Tag_Notes=0
D4_Tag_Variant=0
D4_Tag_Unused=0
D4_Tag_Reference=0
D4_Tag_StrongsHE=0
D4_Tag_StrongsGR=0
D4_Tag_Bold=0
D4_Tag_Italic=0
D4_Tag_MorphologyHE=0
D4_Tag_MorphologyGR=0
D4_TypeOfGRMorphology=0
D4_Tag_Qere=0
D4_Tag_Ketiv=0
D4_Tag_PDF=0
D4_Tag_URL=0

;in the case of Imitation of Christ, we use just plain text without tags. It is possible to insert any combinations of tags, if required and set values to 1.

 

D4_JumpInside=0
;there are no references, thus we must use =0

 

 

 

 

data.txt file

 

IMPORTANT: for d4dwrtxt.exe convertor, file data.txt has different structure:

Each text line, starting by @@ (2 times at character), all line is recognized as label and put into combo box as label of new section.

All text from the next line to next @@ marker (or end of file) will be assigned to this section.

Use common line breaks in editor -no need to have one record per line (and thus use |C or |TL tags as line break).

 

This simple rules allows you to create data.txt file from any text source which you have in text editor. Remember, starting line with @@ characters cannot be inside of text, because is used as label. That is reason, why rare combination of @@ was selected. Also, breaking of lines will be according text in editor, as usual.

 

Below is shortened start of Imitation of Christ. Notes following on next line are in red color

@@Title and Contents

^ this line starts by @@ characters and will be put into combo as first label: Title and Contents

 

Imitation of Christ

^ here starts text, which will be in first record. it is good rule to repeat label for user orientation in text.

Thomas Kempis

^ this is last line of first record

 

@@I. - 1. Imitating Christ and Despising All Vanities on Earth

^ this line starts by @@ characters and will be put into combo as second label: I. - 1. Imitating Christ and Despising All Vanities on Earth

BOOK ONE
THOUGHTS HELPFUL IN THE LIFE OF THE SOUL

The First Chapter

Imitating Christ and Despising All Vanities on Earth

HE WHO follows Me, walks not in darkness," says the Lord.[1] By these words of Christ we are advised to imitate His life and habits, if we wish to be truly enlightened and free from all blindness of heart. Let our chief effort, therefore, be to study the life of Jesus Christ.
The teaching of Christ is more excellent than all the advice of the saints, and he who has His spirit will find in it a hidden manna. Now, there are many who hear the Gospel often but care little for it because they have not the spirit of Christ. Yet whoever wishes to understand fully the words of Christ must try to pattern his whole life on that of Christ.
What good does it do to speak learnedly about the Trinity if, lacking humility, you displease the Trinity? Indeed it is not learning that makes a man holy and just, but a virtuous life makes him pleasing to God. I would rather feel contrition than know how to define it. For what would it profit us to know the whole Bible by heart and the principles of all the philosophers if we live without grace and the love of God? Vanity of vanities and all is vanity, except to love God and serve Him alone.
This is the greatest wisdom -- to seek the kingdom of heaven through contempt of the world. It is vanity, therefore, to seek and trust in riches that perish. It is vanity also to court honor and to be puffed up with pride. It is vanity to follow the lusts of the body and to desire things for which severe punishment later must come. It is vanity to wish for long life and to care little about a well-spent life. It is vanity to be concerned with the present only and not to make provision for things to come. It is vanity to love what passes quickly and not to look ahead where eternal joy abides.
Often recall the proverb: "The eye is not satisfied with seeing nor the ear filled with hearing."[2] Try, moreover, to turn your heart from the love of things visible and bring yourself to things invisible. For they who follow their own evil passions stain their consciences and lose the grace of God.
-----
[1] John 8:12
[2] Eccl. 1:8

^ this is last line of second record

@@I. - 2. Having a Humble Opinion of Self

^ this line starts by @@ characters and will be put into combo as third label: I. - 2. Having a Humble Opinion of Self

The Second Chapter

Having a Humble Opinion of Self

EVERY man naturally desires knowledge; but what good is knowledge without fear of God? Indeed a humble rustic who serves God is better than a proud intellectual who neglects his soul to study the course of the stars. He who knows himself well becomes mean in his own eyes and is not happy when praised by men.
If I knew all things in the world and had not charity, what would it profit me before God Who will judge me by my deeds?
Shun too great a desire for knowledge, for in it there is much fretting and delusion. Intellectuals like to appear learned and to be called wise. Yet there are many things the knowledge of which does little or no good to the soul, and he who concerns himself about other things than those which lead to salvation is very unwise.
Many words do not satisfy the soul; but a good life eases the mind and a clean conscience inspires great trust in God.
The more you know and the better you understand, the more severely will you be judged, unless your life is also the more holy. Do not be proud, therefore, because of your learning or skill. Rather, fear because of the talent given you. If you think you know many things and understand them well enough, realize at the same time that there is much you do not know. Hence, do not affect wisdom, but admit your ignorance. Why prefer yourself to anyone else when many are more learned, more cultured than you?
If you wish to learn and appreciate something worth while, then love to be unknown and considered as nothing. Truly to know and despise self is the best and most perfect counsel. To think of oneself as nothing, and always to think well and highly of others is the best and most perfect wisdom. Wherefore, if you see another sin openly or commit a serious crime, do not consider yourself better, for you do not know how long you can remain in good estate. All men are frail, but you must admit that none is more frail than yourself.
^ this is last line of third record

@@I. - 3. The Doctrine of Truth

...etc till the end of file

 

 

 

 


 

Example4 - STRIPD_HE as DWR (use of d4dwr.exe convertor)

 

This is an example, which you will find in MDK folder. After compilation of module, you can move prepared dwr file to data folder, start Davar4 and open this module.

This module demonstrates to use writing module for data, used also in lexicon (STRIPD_HE lexicone was the primary module).

 

Example of STRIPD_HE writing module: Hebrew text as key (in combo box) and 6 headings with various tags, below is description text area

 

info.txt file

;THIS FILE MUST BE UTF-8, Little Endian, without Byte Order Mark. New line is CR+LF pair

D4_Version_Major=1
D4_Version_Minor=0

D4_OutputFile=stripd_he.dwr
D4_Abbreviation=STRIPD_HE_DWR
D4_Title=STRIPD_HE_DWR
D4_Info=STRIPD_HE_DWR
D4_Copyright=STRIPD_HE_DWR
D4_URL=http://www.davar3.net/

D4_UserNotes=0
D4_BooksNumber=0
D4_BooksExternNumber=0

;note: there are not books, because this module has no references

;NOT NEEDED! #records is detected in compilation D4_Records=8854

;note: present versions of convertors does NOT need know number of records - detection is in compilation time

;Type of key or headers:0=Latin,1=HE,2=GR texts,
;10=Strong HE+GR, 11=HE Strong, 12=GR Strong,
;20=Gematria HE+GR, 21=gematria HE, 22=gematria GR
;30=references
D4_KeyType=1

;note: HE text is keyword

;specification of main language and sublanguage. We use standard Windows
;values expressed by hexadecimal number. This affects sorting of keys in
;module. For English use 0x09 and 0x00, for Hebrew: 0x0d and 0x00 and
;for Greek 0x08 and 0x00. List of all possible values can be found in
;README.TXT for d4lex program and also in MSDN for MAKELANGID macro (also available freely online on Microsoft web)
D4_KeyPrimaryLanguage=0x0d
D4_KeySubLanguage=0x00

;note: according notes above, primary language of key is Hebrew (= 0x0d)

;if key should NOT be synchronised, use value 1
D4_KeyNoSync=0

D4_Headers=6

;note: we have 6 headers

;here can be used 0-9 headers. Not used can be omitted
D4_HeaderType0=1
D4_HeaderLabel0=Word:
;1.st param: HEADER IS VISIBLE (1=yes, 0=no),
;2.nd param: INSERT NEW LINE AFTER HEADER (1=yes, 0=no)
;3.rd param: USE THIS HEADER FOR SEARCHING (e.g. Strong# of word) (1=yes, 0=no)
D4_HeaderParam0=1,1,1

;1. header SHOULD be keyword, we use label Word:

D4_HeaderType1=0
D4_HeaderLabel1=Pronounc:
D4_HeaderParam1=1,1,0

;2. header is pronounciation, label is "Pronounc:", visible header, after header is new line and this header is not used for searching

D4_HeaderType2=11
D4_HeaderLabel2=Strong:
D4_HeaderParam2=1,1,1

;3. header is Strong#, label is "Strong:", visible header, after header is new line and this header is used for searching

D4_HeaderType3=0
D4_HeaderLabel3=Orig:
D4_HeaderParam3=1,1,0

;4. header is origin of the word, label is "Orig:", visible header, after header is new line and this header is not used for searching

D4_HeaderType4=0
D4_HeaderLabel4=Use:
D4_HeaderParam4=1,1,0

;5. header is TWOT number and grammar, label is "Use:", visible header, after header is new line and this header is not used for searching

D4_HeaderType5=12
D4_HeaderLabel5=GR Strong:
D4_HeaderParam5=1,1,0
;6. header is equivalent Greek Strong#, label is "GR_Strong:", visible header, after header is new line and this header is not used for searching

 

D4_Tags=1

;yes, we use Greek and Hebrew Strong# tags, see below

;Tag flags: 0=tag not used,1=tag is used and default visible,3=tag is used and default invisible |
D4_Tag_Preface=0
D4_Tag_Christ=0
D4_Tag_Notes=0
D4_Tag_Variant=0
D4_Tag_Unused=0
D4_Tag_Reference=0
D4_Tag_StrongsHE=1
D4_Tag_StrongsGR=1
D4_Tag_Bold=0
D4_Tag_Italic=0
D4_Tag_MorphologyHE=0
D4_Tag_MorphologyGR=0
D4_TypeOfGRMorphology=0
D4_Tag_Qere=0
D4_Tag_Ketiv=0
D4_Tag_PDF=0

 

D4_JumpInside=1

 

 

 

data.txt file

(remember, each single record is on single line, also block below is one line)

|SKאב|Sk|SLאב|Sl|SH0|THאב|Th|Sh0|SH1|TIabe|Ti|Sh1|SH2|RH3|Rh|Sh2|SH3from the same as 24; a green plant:--greenness, fruit. |RH24|Rh|Sh3|SH4 |TRTWOT-1a|Tr Noun Masculine|Sh4|SH5|RG1080|Rg|RG2590|Rg|RG4491|Rg|Sh5|TL 1) freshness, fresh green, green shoots, or greenery

 

 

|SKאב|Sk - Hebrew keyword inserted into |SK|Sk tags. No need to use |TH|Th tags for Hebrew text, because D4_KeyType was set to 1 (Hebrew)

|SLאב|Sl - Label inserted into |SL|Sl tags. This label is inserted into combo box. No need to use |TH|Th tags for Hebrew text, because D4_KeyType was set to 1 (Hebrew)

|SH0|THאב|Th|Sh0 - 1. header, inside |SH0 and |Sh0 tags. Repeat Hebrew keyword, now it must be inside |TH and |Th tags for switch text to Hebrew

|SH1|TIabe|Ti|Sh1 - 2. header, inside |SH1 and |Sh1 tags, pronunciations. We use tags for italic |TI and |Ti

|SH2|RH3|Rh|Sh2 - 3. header, inside |SH2 and |Sh2 tags. Hebrew Strong# 3: |RH3|Rh

|SH3from the same as 24; a green plant:--greenness, fruit. |RH24|Rh|Sh3 - 4. header, inside |SH3 and |Sh3 tags, origin of the word.

|SH4 |TRTWOT-1a|Tr Noun Masculine|Sh4 - 5. header, inside |SH4 and |Sh4 tags, grammar. We use raised text tags: |TR and |Tr

|SH5|RG1080|Rg|RG2590|Rg|RG4491|Rg|Sh5 - 6. header, inside |SH5 and |Sh5 tags. Greek Strong# equivalents.

|TL 1) freshness, fresh green, green shoots, or greenery - after inserting of empty line |TL (or |C tag) description follows